using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace Slqj.Data
{
	public static class TableXYZDafaultTicketList
	{
		public const string Table = "XYZDafaultTicketList";
		public const string XYZDafaultTicketListID = "XYZDafaultTicketListID";
		public const string TicketsID = "TicketsID";
		public const string IsEnabled = "IsEnabled";
		public const string Description = "Description";
		public const string Sort = "Sort";
		public const string Creater = "Creater";
		public const string CreatedBy = "CreatedBy";
		public const string Created = "Created";
		public const string Modified = "Modified";
		public const string ModifiedBy = "ModifiedBy";
		public const string ModifiedByID = "ModifiedByID";
	}
	
	[Serializable]
	public class BaseXYZDafaultTicketList
		: IDbSessionEntity, IJsonClass
	{
		int m_XYZDafaultTicketListID;
		/// <summary>
        /// 
        /// </summary>
        public int XYZDafaultTicketListID
        {
            get { return m_XYZDafaultTicketListID; }
            set { m_XYZDafaultTicketListID = value; }
        }
		
		int m_TicketsID;
		/// <summary>
        /// 
        /// </summary>
        public int TicketsID
        {
            get { return m_TicketsID; }
            set { m_TicketsID = value; }
        }
		
		bool m_IsEnabled;
		/// <summary>
        /// 
        /// </summary>
        public bool IsEnabled
        {
            get { return m_IsEnabled; }
            set { m_IsEnabled = value; }
        }
		
		string m_Description;
		/// <summary>
        /// 
        /// </summary>
        public string Description
        {
            get { return m_Description; }
            set { m_Description = value; }
        }
		
		int m_Sort;
		/// <summary>
        /// 
        /// </summary>
        public int Sort
        {
            get { return m_Sort; }
            set { m_Sort = value; }
        }
		
		int m_Creater;
		/// <summary>
        /// 
        /// </summary>
        public int Creater
        {
            get { return m_Creater; }
            set { m_Creater = value; }
        }
		
		string m_CreatedBy;
		/// <summary>
        /// 
        /// </summary>
        public string CreatedBy
        {
            get { return m_CreatedBy; }
            set { m_CreatedBy = value; }
        }
		
		DateTime m_Created;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Created
        {
            get { return m_Created; }
            set { m_Created = value; }
        }
		
		DateTime m_Modified;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Modified
        {
            get { return m_Modified; }
            set { m_Modified = value; }
        }
		
		string m_ModifiedBy;
		/// <summary>
        /// 
        /// </summary>
        public string ModifiedBy
        {
            get { return m_ModifiedBy; }
            set { m_ModifiedBy = value; }
        }
		
		int? m_ModifiedByID;
		/// <summary>
        /// 
        /// </summary>
        public int? ModifiedByID
        {
            get { return m_ModifiedByID; }
            set { m_ModifiedByID = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_XYZDafaultTicketListID = reader[TableXYZDafaultTicketList.XYZDafaultTicketListID];
            m_TicketsID = reader[TableXYZDafaultTicketList.TicketsID];
            m_IsEnabled = reader[TableXYZDafaultTicketList.IsEnabled];
            m_Description = reader[TableXYZDafaultTicketList.Description];
            m_Sort = reader[TableXYZDafaultTicketList.Sort];
            m_Creater = reader[TableXYZDafaultTicketList.Creater];
            m_CreatedBy = reader[TableXYZDafaultTicketList.CreatedBy];
            m_Created = reader[TableXYZDafaultTicketList.Created];
            m_Modified = reader[TableXYZDafaultTicketList.Modified];
            m_ModifiedBy = reader[TableXYZDafaultTicketList.ModifiedBy];
            m_ModifiedByID = reader[TableXYZDafaultTicketList.ModifiedByID];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
            writer.SetPrimaryKey(TableXYZDafaultTicketList.XYZDafaultTicketListID, PrimaryKeyType.Identity, XYZDafaultTicketListID);
			writer[TableXYZDafaultTicketList.TicketsID] = TicketsID;
			writer[TableXYZDafaultTicketList.IsEnabled] = IsEnabled;
			writer[TableXYZDafaultTicketList.Description] = Description;
			writer[TableXYZDafaultTicketList.Sort] = Sort;
			writer[TableXYZDafaultTicketList.Creater] = Creater;
			writer[TableXYZDafaultTicketList.CreatedBy] = CreatedBy;
			writer[TableXYZDafaultTicketList.Created] = Created;
			writer[TableXYZDafaultTicketList.Modified] = Modified;
			writer[TableXYZDafaultTicketList.ModifiedBy] = ModifiedBy;
			writer[TableXYZDafaultTicketList.ModifiedByID] = ModifiedByID;
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
            m_XYZDafaultTicketListID = idd;
        }
		
		public string TableName
        {
            get { return TableXYZDafaultTicketList.Table; }
        }
		#endregion
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_XYZDafaultTicketListID = hashToRead["XYZDafaultTicketListID"];
			 
             m_TicketsID = hashToRead["TicketsID"];
			 
             m_IsEnabled = hashToRead["IsEnabled"];
			 
             m_Description = hashToRead["Description"];
			 
             m_Sort = hashToRead["Sort"];
			 
             m_Creater = hashToRead["Creater"];
			 
             m_CreatedBy = hashToRead["CreatedBy"];
			 
             m_Created = hashToRead["Created"];
			 
             m_Modified = hashToRead["Modified"];
			 
             m_ModifiedBy = hashToRead["ModifiedBy"];
			 
             m_ModifiedByID = hashToRead["ModifiedByID"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["XYZDafaultTicketListID"] = XYZDafaultTicketListID;
			 
            hashToFill["TicketsID"] = TicketsID;
			 
            hashToFill["IsEnabled"] = IsEnabled;
			 
            hashToFill["Description"] = Description;
			 
            hashToFill["Sort"] = Sort;
			 
            hashToFill["Creater"] = Creater;
			 
            hashToFill["CreatedBy"] = CreatedBy;
			 
            hashToFill["Created"] = Created;
			 
            hashToFill["Modified"] = Modified;
			 
            hashToFill["ModifiedBy"] = ModifiedBy;
			 
            hashToFill["ModifiedByID"] = ModifiedByID;
			 
        }

        #endregion
		
	}
}
